<template>
    <div class="login">
        <div class="loginBox">
            <h1 style="font-size: 20px;">-<span style="font-size: 40px;">𝒞𝒶𝓀ℯ𝒮𝓉ℴ𝓇ℯ</span>-</h1>
            <el-form :model="form" label-width="auto" style="max-width: 600px">
                <el-form-item label="Account">
                    <el-input v-model="form.account" />
                </el-form-item>
                <el-form-item label="Password">
                    <el-input v-model="form.password" />
                </el-form-item>
                <el-button @click="login">登录</el-button>
            </el-form>
        </div>
    </div>
</template>


<script setup>

import { reactive } from 'vue'
import { Api } from '@/apis/index'
import { useUserStore } from '@/stores/user';
const useUser = useUserStore()
const form = reactive({
    account: '',
    password: ''
})
const login = () => {
    useUser.login(form)
}

</script>


<style lang="scss" scoped>
.login {
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('@/assets/loginBC.svg');
    background-size: cover;

    .loginBox {
        width: 300px;
        background-color: #fff;
        border-radius: 10px;
        padding: 20px;
        padding-bottom: 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.7);
    }
}
</style>